<ul id="mainNav">
   <?php echo '<li>' . '<a href="'.base_url() . 'index.php/SluzobneCesty' .'">' . '<img class="home" src="'.base_url() . 'style/img/home.png'.'"'.'alt="Home"'.'>' . '</a></li>'; ?>
	<li>
      <?php 
      
		if($this->session->userdata('logged_in')){
		if( $this->uri->segment(3) == 'odcestovani' ) echo anchor('SluzobneCesty/getAll/odcestovani','Odcestovaní',array('class'=>'active'));
		else echo anchor('SluzobneCesty/getAll/odcestovani','Odcestovaní');?></li> <!-- Use the "active" class for the active menu item  -->
		<li><?php 
		if( $this->uri->segment(3) == 'pricestovani' ) echo anchor('SluzobneCesty/getAll/pricestovani','Pricestovaní',array('class'=>'active')); 
		else echo anchor('SluzobneCesty/getAll/pricestovani','Pricestovaní')?></li>
		<li><?php 
		if( $this->uri->segment(1) == 'people' ) echo anchor('people','Ľudia',array('class'=>'active'));
		else  echo anchor('people','Ľudia');
		?></li>
		<?php } ?>
		<?php
		if($this->session->userdata('logged_in') && $this->session->userdata('admin')){
		?>
	   <li>
		<?php 
		if( $this->uri->segment(1) == 'logs' ) echo anchor('logs','Logy',array('class'=>'active'));
		else  echo anchor('logs','Logy');
		?>
	   </li> 
	   <li>
		<?php 
		if( $this->uri->segment(1) == 'import_export' ) echo anchor('import_export','Import/Export',array('class'=>'active'));
		else  echo anchor('import_export','Import/Export');
		?>
	   </li> 
	  
	  <?php } ?>


    <li>
	<?php 
	if( $this->uri->segment(1) == 'statistics' ) echo anchor('statistics','Štatistika',array('class'=>'active'));
	else  echo anchor('statistics','Štatistika');
	?>
   </li>
    <?php if( $this->session->userdata('logged_in') ){ ?>
	<li class="logout"><?php echo anchor('auth/logout', 'Odhlásiť ['. $this->session->userdata('meno') .']&rArr;') ?> </a></li>
	<?php } ?>
</ul>
<!-- // #end mainNav -->